package com.gxa.controller;

import com.gxa.pojo.MemLocations;
import com.gxa.pojo.Order;
import com.gxa.utils.Constants;
import com.gxa.utils.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * User: zxy
 * Date: 2020/11/26 18:10
 * Description:
 * Version: V1.0
 */
@RestController
@RequestMapping("/bulkDelivery")
@Api(value = "批量发货",tags = "批量发货")
public class bulkDeliveryController {

    @Autowired
    private ResponseData responseData;

    @GetMapping(value = "/queryBulkDelivery")
    @ApiOperation(value = "查询批量发货",notes = "查询批量发货",httpMethod = "GET", response = ResponseData.class)
    public ResponseData queryBulkDelivery(){
        Order order = new Order();
        order.setOrderId(1);
        order.setOrderCode("订单编号");
        order.setOrderDm("配送方式");
        order.setOrderIn("快递单号");
        MemLocations memLocations = new MemLocations();
        memLocations.setMemName("收货人");
        memLocations.setMemNum("手机");
        order.setMemLocations(memLocations);
        responseData.setCode(Constants.SUCCESS);
        responseData.setMsg("查询成功");
        responseData.setData(order);
        return responseData;
    }

    @GetMapping(value = "/updateBulkDeliveryStatus")
    @ApiOperation(value = "批量发货",notes = "批量发货",httpMethod = "GET", response = ResponseData.class)
    public ResponseData updateBulkDeliveryStatus(){
        responseData.setCode(200);
        responseData.setMsg("发货成功");
        responseData.setData(null);
        return responseData;
    }

}
